<?php
$account = v('account');
$status = v('status');
$rawAccounts = v('rawAccounts');
$rawStatuses = v('rawStatuses');
?>
<div class="span3" style="background-color:#EEE">
	<form id="post_form" method="post" enctype="multipart/form-data" action="<?php p(url('api/json/Account.postStatus')); ?>" >
		Message
		<textarea id="t_post_content" name="content"></textarea>
		<br>
		Picture (optional)
		<input id="i_post_picture" type="file" name="picture"/>
		Link URL (optional)
		<input id="i_post_link" type="text" name="link"/>
		<?php
		foreach($rawAccounts as $rawAccount):
			$account->loadFromRawObject($rawAccount);
		?>
		<div>
			<div style="width:200px;float:left;">
				<label>
					<a href="http://weibo.com/<?php p($account->getInternalId())?>">
						<img style="width:15px height:15px" src="<?php p($account->getAvatar())?>"/>
						<?php p($account->getScreenName())?>
					</a>
				</label>
				<label>Follow:<?php p($account->getFriendsCount())?> Fans:<?php p($account->getFollowersCount())?></label>
			</div>
			<div style="width:50px;float:left;display:block;">
				<input type="checkbox" name="socialNetworks[]" value="<?php p($account->getSocialNetwork()); ?>"/>
			</div>
			<input name="accountIds[<?php p($account->getSocialNetwork()); ?>]" type="hidden" value="<?php p($account->getId()); ?>" />
			<input name="accountReferences[<?php p($account->getSocialNetwork()); ?>]" type="hidden" value="<?php p($account->getReference()); ?>" />
		</div>
		<?php endforeach; ?>
		<div>
			<input type="submit" id="post" class="btn" />
		</div>
	</form>
</div>
<div class="span8" style="background-color:#EEE">
	<a id="update_status" class="btn">Update</a>
	<div class="row-fluid">
		<div class="span1">
			Channel
		</div>
		<div class="span2">
			Date
		</div>
		<div class="span6">
			Message / Operation code
		</div>
		<div class="span3">
			Stats
		</div>
	</div>
	<?php
		foreach($rawStatuses as $rawStatus)
		{
			$status->reset();
			$status->loadFromRawObject($rawStatus);
			render('[Snsfg]/Html/Snippet.Report.html', array('status' => $status, 'account' => $account, 'baseOfProfile' => 'http://weibo.com/'));
		}
	?>
</div>

